package JavaSE.Class11.Demo;

public class Duck extends Animal implements ISwimming,IRunning,IFlying{

    public Duck(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(name+"Duck eat");
    }

    @Override
    public void run() {
        System.out.println(name+"Duck run");
    }

    @Override
    public void swim() {
        System.out.println(name+"Duck swim");
    }

    @Override
    public void fly() {
        System.out.println(name+"Duck fly");
    }
}
